-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[action] simplify address generation #3913
Conversation
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@@ -16,16 +16,16 @@ import ( | |||
"github.com/iotexproject/iotex-core/pkg/version" | |||
) | |||
|
|||
var ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var
is placed in front of type
// RewardingPoolTopic is topic for rewarding pool | ||
RewardingPoolTopic = hash.BytesToHash256(address.RewardingProtocolAddrHash[:]) | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defined but not used at all
data, err := cr.encodeABIBinary() | ||
if err != nil { | ||
return nil, err | ||
} | ||
return types.NewTransaction(cr.Nonce(), ethAddr, big.NewInt(0), cr.GasLimit(), cr.GasPrice(), data), nil | ||
return types.NewTransaction(cr.Nonce(), _stakingProtocolEthAddr, big.NewInt(0), cr.GasLimit(), cr.GasPrice(), data), nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
easier way of generating the address
Codecov Report
@@ Coverage Diff @@
## master #3913 +/- ##
==========================================
+ Coverage 75.38% 76.02% +0.64%
==========================================
Files 303 327 +24
Lines 25923 27822 +1899
==========================================
+ Hits 19541 21152 +1611
- Misses 5360 5578 +218
- Partials 1022 1092 +70
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so, ioAddr
and ethAddr
have the same hash
, but the String()
are different, right?
yes, that's right, they have the same 20-byte |
Description
noticed this while working on #3910
Fixes #(issue)
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: